package com.shujia.day12;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Code07ListTest {
    public static void main(String[] args) {
        /*
            集合的嵌套遍历:
                集合中再存放一个集合
         */

        ArrayList<List<String>> doubleList = new ArrayList<>();
        doubleList.add(Arrays.asList("hello","world","hello","java"));
        doubleList.add(Arrays.asList("hello","python","hello","sql"));

        // 遍历
        //    双重for循环遍历
        for (List<String> list : doubleList) {
            for (String s : list) {
                System.out.println(s);
            }
        }

    }
}
